package com.example.jspweb.model;

import lombok.Getter;
import lombok.Setter;
import java.util.List;

@Getter
@Setter
public class VrpResponse {
    private String status;
    private String message;
    private double cost;
    private List<Route> routes;

    public VrpResponse() {
    }

    @Getter
    @Setter
    public static class Route {
        private String vehicleId;
        private List<Stop> stops;
        private double totalDistance;
        private double totalTime;
        private int totalDemand;

        public Route() {
        }

        public Route(String vehicleId, List<Stop> stops, double totalDistance, double totalTime, int totalDemand) {
            this.vehicleId = vehicleId;
            this.stops = stops;
            this.totalDistance = totalDistance;
            this.totalTime = totalTime;
            this.totalDemand = totalDemand;
        }

        @Getter
        @Setter
        public static class Stop {
            private String serviceId;
            private LocationDto location;
            private int demand;
            private double arrivalTime;
            private double departureTime;

            public Stop() {
            }

            public Stop(String serviceId, LocationDto location, int demand, double arrivalTime, double departureTime) {
                this.serviceId = serviceId;
                this.location = location;
                this.demand = demand;
                this.arrivalTime = arrivalTime;
                this.departureTime = departureTime;
            }
        }
    }
}
